package com.code.user.model.po;

import com.code.commons.model.po.BasePO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.persistence.Id;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 推荐人PO及持久层对象
 *
 * @author tangyifei
 * @since 2020年1月2日13:45:21
 */
@ApiModel("推荐人PO及持久层对象")
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
public class UserRecommender extends BasePO<String> {

    private static final long serialVersionUID = 8609487709343408932L;

    @ApiModelProperty(value = "主键", example = "1")
    @Id
    //@GeneratedValue(generator = "JDBC")
    @Length(min = 1, max = 64)
    private String id;

    @ApiModelProperty(value = "推荐人的主键", example = "1")
    @NotBlank(message = "推荐人的主键不能为空")
    @Length(min = 1, max = 64)
    private String recommenderId;

    @ApiModelProperty(value = "推荐人的手机号", example = "1")
    @NotBlank(message = "推荐人的手机号不能为空")
    private String recommenderPhone;

    @ApiModelProperty(value = "被推荐人的用户主键", example = "1")
    @NotBlank(message = "被推荐人的用户主键不能为空")
    @Length(min = 1, max = 64)
    private String recommenderUserId;

    @ApiModelProperty(value = "被推荐人的用户手机号", example = "150****0055")
    @NotBlank(message = "被推荐人的用户手机号不能为空")
    private String recommenderUserPhone;

    @ApiModelProperty(value = "推荐成功状态（0推荐失败 1推荐成功（被推荐人完成注册并入金成功，即算推荐成功））", example = "0")
    @NotNull(message = "推荐成功状态（0推荐失败 1推荐成功（被推荐人完成注册并入金成功，即算推荐成功））不能为空")
    private Integer recommendState;

    @ApiModelProperty(value = "被推人的顺序", example = "1")
    private Integer recommenderIndex;

    @ApiModelProperty(value = "推荐人收益状态（0未确认 1已确认）", example = "0")
    private Integer recommenderIncomeState;

    @ApiModelProperty(value = "推荐人获取的收益（USDT大小）", example = "0")
    @NotNull(message = "推荐人获取的收益（USDT大小）")
    private BigDecimal recommenderIncome;

    @ApiModelProperty(value = "推荐人获取的收益历史（USDT大小）", example = "0")
    private String recommenderIncomeHistory;

    @ApiModelProperty(value = "用户USDT币种余额相关的版本号(钱包的版本号)", example = "0")
    private Integer usdtCoinBalanceVersion;

    @ApiModelProperty(value = "用户矿池相关的版本号(钱包的版本号)", example = "0")
    private Integer orePoolVersion;

    @ApiModelProperty(value = "自动获得的USD金额（矿池大小）", example = "0")
    private BigDecimal orePool;

    @ApiModelProperty(value = "个人累计静态收益(usdt)", example = "0")
    private BigDecimal totalStaticIncomeAmount;

    @ApiModelProperty(value = "累计入金金额（usdt）", example = "0")
    private BigDecimal totalEntryAmount;

    @ApiModelProperty(value = "0 未充值  1已充值（比如得到2000usd）2已释放完(比如已释放完2000usd)  3进入第一轮推荐  4进入第二轮推荐 5两轮推荐完成并成为V1用户", example = "0")
    private Integer azPlanStatus;

    @ApiModelProperty(value = "当前用户的VIP级别", example = "V0")
    private String userVipLevel;

    @ApiModelProperty(value = "推荐的人数", example = "5")
    private Integer recommendPersonAmount;
}
